#include <iostream>
#include <math.h>
using namespace std;

int main(){
    int input = 0;
    int super = 0;
    cout<<"please input the binary: ";
    cin>>input;
    int sum = 0;   //10进制的结果
    int times = 0; //2的几次方
    while (input>0){
        int a = input%10;
        sum += a * (int)pow(2,times);
        input = input/10;
        times++;
    }
    cout<<sum;





    return 0;
}